
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObject;
using DataAccessLayer;

namespace BusinessLogic
{
    /// <summary>
    /// Define PhieuThuUtil class. This class user for BussinessLayer.

    /// </summary>
    public class PhieuThuUtil
    {
        /// <summary>
        /// Define function Insert for PhieuThu Object.
        /// </summary>
        /// <param name="t">object data need Insert.</param>
        /// <returns>
        ///    True: if insert successfull.
        ///    False: if insert error.
        ///</returns>
        public static bool Insert(PhieuThu t)
        {

            return PhieuThuDao.Insert(t);
        }
        /// <summary>
        /// Define function Update for PhieuThu Object.
        /// </summary>
        /// <param name="t">project data need updated.</param>
        /// <returns>
        ///    True: if update successful.
        ///    False: if update Error.
        ///</returns>
        public static bool Update(PhieuThu t)
        {

            return PhieuThuDao.Update(t);
        }
        /// <summary>
        /// Get All PhieuThu object from table PhieuThu.
        /// </summary>
        /// <returns>List PhieuThu object.</returns>
        public static List<PhieuThuResult> GetAll()
        {
            return PhieuThuDao.GetAll();
        }
        /// <summary>
        /// Search PhieuThu object in table PhieuThu.
        /// </summary>
        /// <param name="t">Condition for Search.</param>

        /// <returns>List PhieuThuResult objects.</returns>

        public static List<PhieuThuResult> SearchPhieuThuSomeCondition(PhieuThu t)
        {
            return PhieuThuDao.SearchPhieuThuSomeCondition(t);
        }
        /// <summary>
        /// Get a PhieuThu data object by primary key. 
        /// </summary>
        /// <param name="maPhieuThu" >This is primary key.</param>
        /// <returns>A PhieuThu object.</returns>

        public static PhieuThu Get(int maPhieuThu)
        {
            return PhieuThuDao.Get(maPhieuThu);
        }
        /// <summary>
        /// This function to Delete PhieuThu object by primary key.
        /// </summary>
        /// <param name="maPhieuThu" >This is primary key.</param>
        /// <returns>If succesful return True else  return False.</returns>

        public static bool Delete(int maPhieuThu)
        {

            return PhieuThuDao.Delete(maPhieuThu);
        }
        public static List<PhieuThu> GetByMaPhieuBanHang(Int64 maPhieuBanHang)
        {
            return PhieuThuDao.GetByMaPhieuBanHang(maPhieuBanHang);
        }
    }
}